﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;

namespace WindowsGame1
{
    class hero : Personnage
    {

        public hero(Texture2D tex ,int hauteur, int largeur)
        {
            base.nomduperso = "test";
            base.force = 10;
            base.vie = 100;
            base.vitesse = 3;
            base.portée = 1;
            base.Sprite = tex;
            base.spritehauteur = hauteur;
            base.spritelargeur = largeur;
        }

       override public void attaquer(Case tile)
        {
            if (tile.est_occupée)
            {
                Random r_degats = new Random();
                tile.contient.vie -= (this.force + r_degats.Next(10));
                Game1.soundEffect.Play();
                Game1.soundEffect4.Play();
                Game1.soundEffect2.Play();
                Console.WriteLine(tile.contient.vie);
            }
                
 
        }

    }
}
